Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use manage_options instead of edit_plugins capability #14

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Use manage_options instead of edit_plugins capability #14

wants to merge 3 commits into from

Conversation

stevegrunwell
Copy link

According to the WordPress Codex, the edit_plugins capability is mostly used to determine whether Plugins > Plugin Editor is accessible. On sites that use wp-config.php constants like DISALLOW_FILE_EDIT (for instance, all of my production sites), the edit_plugins capability is deactivated, meaning I can't configure this plugin without enabling the plugin editor.

This pull request changes the capability to the more sensible manage_options - if the user has the power to change the site title, permalink structure, and other much more destructive changes, they should be able to edit the Twitter configuration.

Use the activate_plugins, not edit_plugins, capability for add_options_page() as the latter makes the plugin settings page inaccessible when DISALLOW_FILE_EDIT is enabled in wp-config.php
Instead of activate_plugins, use the much more sensible manage_options capability.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant